  README for XFree86 3.1.2 on LynxOS
  Thomas Mueller
  14 November 1995

  1.  What and Where is XFree86?

  XFree86 is a port of X11R6 that supports several versions of Intel-
  based Unix.  It is derived from X386 1.2, which was the X server
  distributed with X11R5.  This release consists of many new features
  and performance improvements as well as many bug fixes.  The release
  is available as source patches against the X Consortium X11R6 code, as
  well as binary distributions for many architectures.

  See the Copyright Notice in COPYRIGHT <COPYRIGHT.html>.

  The sources for XFree86 are available by anonymous ftp from:

  ftp.XFree86.org:/pub/XFree86/current
  <ftp://ftp.XFree86.org/pub/XFree86/current>

  The XFree86 LynxOS port was developed using `LynxOS AT 2.3.0 080695-A
  FCS'.

  XFree86 currently supports only LynxOS on the AT platform. The library
  and client part of XFree86 could although compile without problems on
  other LynxOS platforms (e.g. SPARC, Motorola-68K or PowerPC).

  2.  Bug Reports for This Document

  Send email to tm@systrix.de (Thomas Mueller) or XFree86@XFree86.org if
  you have comments or suggestions about this file and we'll revise it.

  3.  Compiling the XFree86 Distribution

  3.1.  Disk space requirements

  Currently there is no support for shared libraries in the LynxOS
  XFree86 port. A complete binary installation along with manual pages
  will require approximately 70-90 MBytes of disk space. To compile the
  system you will need at least 230 MBytes of free disk space.

  3.2.  Changes to system environment

  Before compiling the XFree86 distribution you will have to make a few
  little adjustments to your system:


     LynxOS AT 2.3

        o  Use the CYGNUS GNU-C Compiler to build XFree86. With LynxOS
           2.3.0 you must execute the shell script /CYGNUS.bash to apply
           the necessary changes to your environment.

        o  Create a shell script named /lib/cpp as follows:


                 #!/bin/sh
                 /cygnus/94q4-lynxos-x86/lib/gcc-lib/i386-lynx/2.6-94q4/cpp \
                           -traditional "$@"





        It is possible that future releases use a different path for the

        CYGNUS compiler support programs. You may use


                     gcc -v





        to find out the correct path. Set the file mode of /lib/cpp with


                     # chown root /lib/cpp
                     # chmod 755 /lib/cpp





     LynxOS AT 2.2.1

        o  Create a shell script named /lib/cpp as follows:


                 #!/bin/sh
                 /usr/local/lib/gcc-cpp -traditional "$@"





        o  The loader /bin/ld of LynxOS 2.2.1 does not support the -L
           option which is heavily used by X11R6 makefiles. To work
           around this problem you must install a small wrapper program
           which replaces the original /bin/ld program. Use the
           following steps to install it:


                   # cd xc/programs/Xserver/hw/xfree/etc
                   # cc -o ld ld-wrapper.c
                   # mv /bin/ld /bin/ld.org
                   # mv ld /bin/ld
                   # chmod 511 /bin/ld
                   # chown root /bin/ld





        o  Modify system header files as follows:

           /usr/include/uio.h
              surrounded by


                          #ifndef _UIO_H
                          #define _UIO_H
                          ...
                          #endif







           /usr/include/utmp.h
              surrounded by


                          #ifndef _UTMP_H
                          #define _UTMP_H
                          ...
                          #endif





           /usr/include/unistd.h
              add


                          extern int read();





  3.3.  make World

  Before you start compilation you must edit xc/config/cf/lynx.cf to
  match your operating system version. Change the definitions of
  OSMajorVersion, OSMinorVersion and OSTeenyVersion accordingly.

  For LynxOS 2.3.0 the OptimizedCDebugFlags is set to `-O -m486'. Higher
  optimization levels are not enabled by default to work around a bug in
  -O2 for GCC v2.6.x.  You might try enabling -O2 if your compiler does
  not have this bug, but if the session manager xsm hangs on startup it
  would be a good idea to switch back to -O.

  You may now issue a



            make World





  to compile XFree86. After a few hours (and hopefully a successful
  build of the XFree86 system) you can install the software using



            make install





  You must be logged in as super-user (root) when you invoke `make
  install'.  Be sure to set your environment to use the same compiler
  (LynxOS 2.3.0, CYGNUS GNU-C) as you did during the `make World'. To
  install the LinkKit use






       make install.linkkit





  With LynxOS 2.2.1 programs will not be stripped during installation.
  This is due to a problem with the strip program which shows up when
  installing across file system boundaries.

  Refer to section 5 for manual page installation.

  4.  Running XFree86

  4.1.  System requirements

  A minimum of 8MB of memory is required to run X. If you want to run
  real-world applications you should think of upgrading to 16MB. If you
  plan to develop software under X take 32MB into consideration.

  4.2.  System tuning

  4.2.1.  Tunable parameters

  To run XFree86 reasonably you must adjust a few system parameters in
  /usr/include/param.h:


    Tunable                                               Old     New
    USR_NFDS      number of open files per process         20      64
    NPROC         number of tasks                          50     150
    NFILES        number of open files in system          100     250
    NINODES       number of incore inodes                 (same value as NFILES)
    QUANTUM       clock ticks until preemption             64      20
    CACHEBLKS     number of cache memory blocks           202      >= 4096



  The new values are those suggested by the LynxOS documentation for
  their X Window package.

  4.2.2.  Increase number of ptys

  You should also increase the number of ptys to be able run a couple
  more xterms. You may replace /sys/lynx.os/pty.cfg with
  /usr/X11R6/lib/X11/etc/pty.cfg.

  4.2.3.  Kernel build

  If you plan to use PS/2 or Bus mice refer to the following section
  before rebuilding the kernel, if not, you should rebuild the kernel
  now:



            # cd /sys/lynx.os
            # make install
            # reboot -N








  4.3.  Bus mouse drivers

  LynxOS does not provide device drivers for Bus or PS/2 mice.
  /usr/X11R6/lib/X11/etc/BM-Lynx.shar contains a port of the Linux
  drivers for those devices. To install the drivers unpack the tar



           # cd /
           # bash /usr/X11R6/lib/X11/etc/BM-Lynx.shar





  and follow the notes in /BMOUSE.Readme for further installation and
  configuration notes.

  4.4.  ATC console driver and VT switching

  The XFree86 servers will only run with the default LynxOS console
  driver, sorry for those of you who use the alternative vdt console
  driver. Currently there is no support for virtual terminal switching
  once the server has started.

  You will need a free console which the X server will use for keyboard
  input. You must disable login on at least one of the four virtual
  terminals in /etc/ttys, e.g. /dev/atc3:


       change

              /dev/atc3:1:default:vt100at:/bin/login



       to

              /dev/atc3:0:default:vt100at:/bin/login
                        ^





  4.5.  X Server debug diagnostics output and other VT peculiarities

  The XFree86 X servers will produce a lot of diagnostics output on
  stderr during startup. This output will be lost after the server
  reached a certain point in its console initialization process. You
  should redirect stdout and stderr if you want to analyze the
  diagnostics produced by the server.

  When the X server is running output made to other consoles will be
  lost. After server shutdown the screen contents of other consoles may
  be inconsistent with what one would expect (i.e. random).

  5.  Installing XFree86 manual pages

  LynxOS uses cat-able manual pages, and because a doc preparation
  system is definitely not a vital component of a real-time operating
  system you must first install groff-1.09. With LynxOS 2.3.0 it
  compiles right out of the box (or better tar archive).

  XFree86 manual pages may be installed using

            make install.man





  The index and whatis database for the XFree86 manual pages will be
  created automatically. If you have already a whatis database or index
  file in the destination directories you should perform a sort/uniq
  operation to remove duplicate entries:



            for i in 1 3 5
            do
              rm -f /tmp/tmpfile
              sort /usr/X11R6/man/cat$i/LIST$i | uniq > /tmp/tmpfile
              mv /tmp/tmpfile /usr/X11R6/man/cat$i/LIST$i
            done
            sort /usr/X11R6/man/whatis | uniq > /tmp/tmpfile
            mv /tmp/tmpfile /usr/X11R6/man/whatis





  With LynxOS 2.3.0 you should include /usr/X11R6/man in the MANPATH
  environment variable.


       bash:   MANPATH=$MANPATH:/usr/X11R6/man


  The /bin/man command of LynxOS 2.2.1 does not support the MANPATH
  environment variable properly. The XFree86 manual pages must be copied
  (or linked) to the standard manual page locations (/usr/man/catx) in
  order to be read the man command:



             for i in 1 3 5
             do
               ln -s /usr/X11R6/man/cat$i/*.* /usr/man/cat$i
               cat /usr/X11R6/man/cat$i/LIST$i >> /usr/man/cat$i/LIST$i
               sort -o /usr/man/cat$i/LIST$i /usr/man/cat$i/LIST$i
               cat /usr/X11R6/man/cat$i/whatis$i >> /usr/man/whatis
             done





  6.  Using XFree86 with Motif

  The Motif libraries shipped with LynxOS AT 2.3.0 can be used with the
  XFree86 libraries. Follow the steps outlined below after you have
  installed XFree86 and LynxOS Motif on your system.

  6.1.  Copy Motif files

  You must create symbolic links for the Motif libraries and utilities
  in the /usr/X11R6 directory tree.




        ln -s /usr/bin/X11/uil /usr/X11R6/bin
        ln -s /usr/lib/libUil.a /usr/X11R6/lib
        ln -s /usr/lib/libMrm.a /usr/X11R6/lib
        ln -s /usr/lib/X11/uid /usr/X11R6/lib/X11
        ln -s /usr/include/Xm /usr/X11R6/include
        ln -s /usr/include/Mrm /usr/X11R6/include
        ln -s /usr/include/uil /usr/X11R6/include





  The Motif imake-configuration files are part of the LynxOS X Window
  package. They must be copied to the /usr/X11R6 directory tree.


             cp /usr/lib/X11/config/Motif.* /usr/X11R6/lib/X11/config





  6.2.  Motif library patch

  The XFree86 libraries are compiled with the -mposix compiler option
  while the Motif libraries shipped with LynxOS AT 2.3.0 are not. This
  incompatibility will cause Motif XmFileSelection widgets to be linked
  with the wrong (i.e. POSIX) directory routines. To circumvent this
  problem apply the following patch to the library:


             cp /usr/lib/libXm.a /usr/X11R6/lib
             ar x /usr/X11R6/lib/libXm.a Xmos.o
             ar x /lib/libc.a directory.s.o
             ld -r -o x.o Xmos.o directory.s.o
             mv x.o Xmos.o
             ar r /usr/X11R6/lib/libXm.a Xmos.o





  6.3.  X11R6 config file patch

  Edit /usr/X11R6/lib/X11/config/lynx.cf and change the definition of
  HasMotif

       from

              #define HasMotif    NO



       to

              #define HasMotif    YES





  6.4.  Motif config file patch

  The file Motif.tmpl shipped with LynxOS Motif must be modified to work
  with XFree86. In every reference to UnsharedLibReferences the first

  argument must be changed

       from

              UnsharedLibReferences(<Something>LIB, Arg2, Arg3)



       to

              UnsharedLibReferences(<Something>, Arg2, Arg3)





  Be sure to apply the change to the file copied to
  /usr/X11R6/lib/X11/config.


  Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/LynxOS.sgml,v 3.4 1995/12/28 03:49:29 dawes Exp $





  $XConsortium: README.LynxOS /main/4 1995/12/29 15:56:10 kaleb $






































$XFree86: xc/programs/Xserver/hw/xfree86/doc/README.LynxOS,v 3.4 1995/12/28 03:52:19 dawes Exp $
